package cool.taomu.toolkit.git.entity

import org.eclipse.xtend.lib.annotations.Accessors
import org.eclipse.xtend.lib.annotations.ToString

@Accessors
@ToString
@Deprecated
class FileWriteEntity {
	enum OperationType {
		ADD,
		RM
	}

	String path;
	String content = "";
	OperationType type = OperationType.ADD;

	def ADD() {
		this.type = OperationType.ADD;
		return this;
	}

	def RM() {
		this.type = OperationType.RM;
		return this;
	}

	new(String path) {
		this.path = path;
	}

	/**
	 * String path
	 * String content
	 */
	new(String path, String content) {
		this.path = path;
		this.content = content;
	}

	new(String path, OperationType type) {
		this.path = path;
		this.type = type;
	}

	/**
	 * path String
	 * content String
	 * type OperationType
	 */
	new(String path, String content, OperationType type) {
		this.path = path;
		this.content = content;
		this.type = type;
	}
}
